/*
 * @Author: your name
 * @Date: 2020-04-28 20:07:32
 * @LastEditTime: 2020-04-29 16:37:33
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \myprojectg:\coding\yjw\src\service\search.js
 */
import Api from './api';
import qs from 'qs'
import { APIURL } from "utils/base";

class SearchApis extends Api {
    constructor() {
        super();
    }

    //获取搜索新闻
    getSearchNews (query) {
        return this.get('/lter-web/v1/search/searchNews', query).then(({ data }) => {
            return data;
        })
    }
    //获取最新发布
    getNewestNews () {
        return this.get('/lter-web/v1/news/queryNewestNews').then(({ data }) => {
            return data;
        })
    }

    // 产品智库搜索
    getHangYeZhiKu (json) {
        return this.post(`${APIURL()}/backend/search`, qs.stringify(json)).then(({ data }) => {
            return data.list;
        })
    }

}

export default new SearchApis();